<script setup lang="ts">
import { onMounted } from 'vue';
onMounted(() => {
  window.addEventListener('contextmenu', e => {
    e.preventDefault();
  });
});
</script>

<template>
  <!-- vue3.0配置 -->
  <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component" v-if="$route.meta.keepAlive" />
    </keep-alive>
    <component :is="Component" v-if="!$route.meta.keepAlive" />
  </router-view>
</template>

<style>
html,
body,
#app {
  /*设置内部填充为0，几个布局元素之间没有间距*/
  padding: 0px;
  /*外部间距也是如此设置*/
  margin: 0px;
  /*统一设置高度为100%*/
  height: 100%;
}
#app {
  min-height: 400px;
  font-family: 'Calibri';
}
img {
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}
/* 设置滚动条的样式 */
::-webkit-scrollbar {
  width: 6px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
  /* background: rgba(220, 220, 220, 0.1);
  border-radius: 8px; */
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 15%);
  border-radius: 8px;
}
</style>
